*******************************************************
* main_analysis.do
* Replication file for main regression analyses
* Paper: "Powers and Practices in Labor Standards Enforcement" in Regulation & Governance 
* Author: Daniel J. Galvin, et al.
* Date created: February 4, 2026
*
* Description:
* This do-file reproduces the main empirical analyses in the paper.
* It estimates survey-weighted logistic regression models of
* minimum wage violations using CPS-MORG data.
*
* Notes:
* - Survey design accounts for state-level PSUs and regional strata.
* - All models restrict the sample to non-exempt workers working
*   more than 10 hours per week with non-missing wage data.
* - This file assumes the analysis dataset is already cleaned and
*   loaded into memory.
*******************************************************

version 13.1
clear matrix
set more off

*******************************************************
* 1. Survey design specification
*******************************************************

svyset statefip [pw=orgwgt12], strat(region) vce(linearized) singleunit(centered)

*******************************************************
* 2. Sample definition (for reference)
*******************************************************

* Subpopulation condition used in all models:
* exemptions2018 == 0
* over10hours == 1
* wageotc_noadj != .
* dropobs == 0

*******************************************************
* 3. Main regression analyses
*******************************************************

*******************************************************
* Model 1: Enforcement Powers only
*******************************************************

svy, subpop(if exemptions2018==0 & over10hours==1 & wageotc_noadj!=. & dropobs==0):  ///
    logit mwviolstate25  ///
        i.year  ///
        i.age_cat  ///
        i.female  ///
        i.wbhaom  ///
        i.citizen  ///
        i.educ  ///
        i.mind16  ///
        i.docc03  ///
        i.unmem  ///
        c.investigatorspercap  ///
        uemonth  ///
        housingpriceindex  ///
        kaitz_c  ///
        c.fiftyten  ///
        c.political_index  ///
        privsector  ///
        c.powers

*******************************************************
* Marginal effects: Enforcement Powers
*******************************************************

margins, at(powers=(0 .25 .5 .75 1))
* marginsplot


*******************************************************
* Model 2: Enforcement Practices only
*******************************************************

svy, subpop(if exemptions2018==0 & over10hours==1 & wageotc_noadj!=. & dropobs==0):  ///
    logit mwviolstate25  ///
        i.year  ///
        i.age_cat  ///
        i.female  ///
        i.wbhaom  ///
        i.citizen  ///
        i.educ  ///
        i.mind16  ///
        i.docc03  ///
        i.unmem  ///
        c.investigatorspercap  ///
        uemonth  ///
        housingpriceindex  ///
        kaitz_c  ///
        c.fiftyten  ///
        c.political_index  ///
        privsector  ///
        c.practices

*******************************************************
* Marginal effects: Enforcement Practices
*******************************************************

margins, at(practices=(0 .25 .5 .75 1))
* marginsplot


*******************************************************
* Model 3: Interaction of Enforcement Powers and Practices
*******************************************************

svy, subpop(if exemptions2018==0 & over10hours==1 & wageotc_noadj!=. & dropobs==0):  ///
    logit mwviolstate25  ///
        i.year  ///
        i.age_cat  ///
        i.female  ///
        i.wbhaom  ///
        i.citizen  ///
        i.educ  ///
        i.mind16  ///
        i.docc03  ///
        i.unmem  ///
        c.investigatorspercap  ///
        uemonth  ///
        housingpriceindex  ///
        kaitz_c  ///
        c.fiftyten  ///
        c.political_index  ///
        privsector  ///
        c.powers##c.practices

*******************************************************
* Marginal effects: Practices at Powers = 1
*******************************************************

margins, at(practices=(0 .25 .5 .75 1) powers=(1))

*******************************************************
* End of main_analysis.do
*******************************************************
